/ Assembly List / LJCNetCommon / AppSettings / GetBool

Namespace - LJCNetCommon


Parameters
keyName - The setting key name.

Returns

The bool setting value.

Syntax

C#
public Boolean GetBool(String keyName)

Gets the bool value of the specified setting. (E)

Example

C#
// App.Config file.
// <configuration>
//   <appSettings>
//     <add key="UseLocal" value="true" />
//   </appSettings>
// </configuration>

using LJCNetCommon;

var appSettings = new AppSettings("AppName.exe.config");
bool useLocal = appSettings.GetBool("UseLocal");

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.